package com.kantboot.system.user.balance.service;

import com.kantboot.system.user.balance.domain.dto.ChangeBalanceDTO;
import com.kantboot.system.user.balance.domain.entity.SysUserBalance;
import com.kantboot.system.user.balance.domain.entity.SysUserBalanceChangeRecord;

import java.math.BigDecimal;
import java.util.List;

/**
 * 用户余额服务接口
 */
public interface ISysBalanceService {

    /**
     * 余额变动
     */
    void changeBalance(ChangeBalanceDTO changeBalanceDTO);

    /**
     * 处理余额变动记录
     * @param userBalanceRecordId 用户余额变动记录ID
     */
    void handleBalanceChangeRecord(Long userBalanceRecordId);

    /**
     * 获取所谓未处理的余额变动记录
     */
    List<SysUserBalanceChangeRecord> getUserBalanceChangeRecordByNotProcessed();

    /**
     * 获取用户余额
     */
    SysUserBalance getUserBalance(Long userId, String balanceCode);

    /**
     * 获取用户余额数量
     */
    BigDecimal getUserBalanceNumber(Long userId, String balanceCode);

}
